package com.niit.ai.dl.dltrain.web;

import com.niit.ai.dl.dltrain.service.ModelTypeService;
import com.niit.ai.dl.dltrain.web.model.ModelTypeListRsp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/modelType")
public class ModelTypeController {
    private static final Logger LOG = LoggerFactory.getLogger(ModelController.class);

    @Autowired
    private ModelTypeService modelTypeService;

    @RequestMapping(value = "/queryList", method = RequestMethod.GET)
    @ResponseBody
    public ModelTypeListRsp queryList() {
        LOG.info("req");
        ModelTypeListRsp rsp = modelTypeService.queryList();
        LOG.info("rsp = {}", rsp);
        return rsp;
    }
}
